if($.amud==null)
	$.amud={};
$.amud.msg={
	toHtmlRecursive:function(obj,msg){
		ret=msg;
		if(isObject(obj) || isArray(obj)){
			for(var i in obj){
				if(!isNumber(i)){
					id="class='"+i+"'";
				}else{
					id="";
				}
				ret=ret+"<div "+id+">";
				if(isObject(obj[i]) || isArray(obj[i])){
					ret=ret+$.amud.msg.toHtml(obj[i]);
				}else{
					ret=ret+obj[i];
				}
				ret=ret+"</div>";
			}
		}else{
			ret=ret+obj;
		}
		return ret;
	},
	toHtml:function(obj){
		//verify if the obj is an item by the currDurability property
		if(obj.weight!=null)
			return $.amud.items.formatItem(obj);
		else
			return $.amud.msg.toHtmlRecursive(obj,'');
	}
}
